package com.cskaoyan.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * {"username":"songge","password":"niupi","age":50,"birthday":"1995-03-19"}
 * @author stone
 * @date 2022/11/16 14:24
 */
@NoArgsConstructor
@Data
public class User {

    private String username;
    private String password;
    private int age;
    // @DateTimeFormat(pattern = "yyyy-MM-dd")  → key=value这种请求参数
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date birthday;

}
